<?php
import( 'de.ceus-media.framework.krypton.core.View' );
/**
 *	View of static Contents.
 *	@package		mv2.view
 *	@extends		Core_View
 *	@uses			InterfaceViews
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			11.12.2006
 *	@version		0.1
 */
/**
 *	View of static Contents.
 *	@package		mv2.view
 *	@extends		Core_View
 *	@uses			InterfaceViews
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			11.12.2006
 *	@version		0.1
 */
class View_Content extends Framework_Krypton_Core_View
{
	/**
	 *	Build Content Views by loading static HTML Files.
	 *	@access		public
	 *	@return		void
	 */
	function buildContent()
	{
		$config		= $this->registry->get( 'config' );
		$session	= $this->registry->get( 'session' );
		$request	= $this->registry->get( 'request' );
		$platform	= $this->registry->get( 'platform' );
		
		$link		= $request->get( 'link' );
		$lan		= $session->get( 'language' );
		$file		= $config['paths']['accounts'].$platform->getPlatformName()."/".$config['paths']['html'].$lan."/".$link.".html";
		if( file_exists( $file ) )
			return implode( "", file( $file ) );
		else
			$this->messenger->noteFailure( str_replace( "#URI#", $file, $this->words['main']['msg']['error_no_content'] ) );
	}
	
	/**
	 *	Returns Extra View of Home Screen.
	 *	@access		public
	 *	@return		string
	 */
	function buildExtra()
	{
		return $this->loadContent( 'extra.html' );
	}
}
?>